<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * @fileOverview 공통 > 기능별 객체 생성 및 비지니스 로직에 의한 연관성을 부여하며 각 기능별 컨트롤러간 메세지 기반의 통신을 담당하는 추상 클래스
<span class='line'>  3</span>  * @author oz_moon, qpitlove, dioong
<span class='line'>  4</span>  */</span><span class="WHIT">
<span class='line'>  5</span> </span><span class="NAME">nhn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.nhn</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="NAME">nhn.newsstand.common</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.common</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  8</span> </span><span class="NAME">nhn.newsstand.common.AbstractController</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Class</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>  9</span> </span><span class="WHIT">	</span><span class="COMM">/** @lends nhn.newsstand.common.AbstractController.prototype */</span><span class="WHIT">
<span class='line'> 10</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 11</span> 	 * nhn.newsstand.common.AbstractController 클래스의 객체를 생성한다.  
<span class='line'> 12</span> 	 * @constructs
<span class='line'> 13</span> 	 * @class 공통 > 기능별 객체 생성 및 비지니스 로직에 의한 연관성을 부여하며 각 기능별 컨트롤러간 메세지 기반의 통신을 담당하는 추상 클래스
<span class='line'> 14</span> 	 * @example
<span class='line'> 15</span> var ImplController = $Class({
<span class='line'> 16</span> 	$init : function(sControllerName){ this._sControllerName = sControllerName; },
<span class='line'> 17</span> 	MSG_showMsg : function(sMsg){
<span class='line'> 18</span> 		console.log(this._sControllerName + " received Msg :" + sMsg); 
<span class='line'> 19</span> 	}  
<span class='line'> 20</span> }).extend(nhn.newsstand.common.AbstractController);
<span class='line'> 21</span> var mainController = new ImplController("Main");
<span class='line'> 22</span> var sub1Controller = new ImplController("Sub1");
<span class='line'> 23</span> var sub2Controller = new ImplController("Sub2");
<span class='line'> 24</span> var sub11Controller = new ImplController("Sub11");
<span class='line'> 25</span> var sub12Controller = new ImplController("Sub12");
<span class='line'> 26</span> var sub111Controller = new ImplController("Sub111");
<span class='line'> 27</span> var sub112Controller = new ImplController("Sub112");
<span class='line'> 28</span> var sub113Controller = new ImplController("Sub113");
<span class='line'> 29</span> mainController.addController("Sub1", sub1Controller);
<span class='line'> 30</span> mainController.addController("Sub2", sub2Controller);
<span class='line'> 31</span> sub1Controller.addController("Sub11", sub11Controller);
<span class='line'> 32</span> sub1Controller.addController("Sub12", sub12Controller);
<span class='line'> 33</span> sub11Controller.addController("Sub111", sub111Controller);
<span class='line'> 34</span> sub11Controller.addController("Sub112", sub112Controller);
<span class='line'> 35</span> sub11Controller.addController("Sub113", sub113Controller);
<span class='line'> 36</span> mainController.startUp();
<span class='line'> 37</span> 
<span class='line'> 38</span> sub113Controller.sendMessage("showMsg", ["Hello World"]);
<span class='line'> 39</span> ===================== output =========================
<span class='line'> 40</span> Main received Msg :Hello World
<span class='line'> 41</span> Sub1 received Msg :Hello World
<span class='line'> 42</span> Sub11 received Msg :Hello World
<span class='line'> 43</span> Sub111 received Msg :Hello World
<span class='line'> 44</span> Sub112 received Msg :Hello World
<span class='line'> 45</span> Sub113 received Msg :Hello World
<span class='line'> 46</span> Sub12 received Msg :Hello World
<span class='line'> 47</span> Sub2 received Msg :Hello World
<span class='line'> 48</span> 	 */</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">	</span><span class="NAME">$init</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oOptions</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT">		</span><span class="NAME">this._oController</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">		</span><span class="NAME">this._oOptions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 55</span> 	 * 옵션값을 설정하거나 가져온다.
<span class='line'> 56</span> 	 * @param {String} sName  옵션 이름
<span class='line'> 57</span> 	 * @param {Object|Undefined} [oValue] 옵션 값
<span class='line'> 58</span> 	 * @return {Void|Object} sName과 oValue의 값이 존재하면 반환값 없음, sName만 값이 존재하면 해당 oValue 리턴 
<span class='line'> 59</span> 	 */</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT">	</span><span class="NAME">options</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oValue</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">		</span><span class="KEYW">switch</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">sName</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT">		</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._oOptions</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="WHIT">		</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">oValue</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._oOptions</span><span class="PUNC">[</span><span class="NAME">sName</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">			</span><span class="NAME">this._oOptions</span><span class="PUNC">[</span><span class="NAME">sName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oValue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">			</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT">		</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sKey</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">sName</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">this._oOptions</span><span class="PUNC">[</span><span class="NAME">sKey</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sName</span><span class="PUNC">[</span><span class="NAME">sKey</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">			</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 74</span> 	 * 하위컨트롤러를 추가한다.
<span class='line'> 75</span> 	 * @param {String} sName 컨트롤러 이름
<span class='line'> 76</span> 	 * @param {nhn.newsstand.common.AbstractController} oController 하위 컨트롤러 객체 
<span class='line'> 77</span> 	 */</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">	</span><span class="NAME">addController</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">sName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oController</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">		</span><span class="NAME">oController._super</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">		</span><span class="NAME">this._oController</span><span class="PUNC">[</span><span class="NAME">sName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oController</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 81</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 82</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 83</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 84</span> 	 * 하위컨트롤러를 제거한다.
<span class='line'> 85</span> 	 * @param {String} sName 컨트롤러 이름
<span class='line'> 86</span> 	 */</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">	</span><span class="NAME">removeController</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">sName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT">		</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">this._oController</span><span class="PUNC">[</span><span class="NAME">sName</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 92</span> 	 * 부모 컨트롤러 혹은 자신, 그리고 하위 컨트롤러에게 정의된 메시지와 파라미터를 전파한다.
<span class='line'> 93</span> 	 * 최상위 컨트롤러로 메세지를 발생시키도록 탐색과정을 거처 한번만 메세지를 발생시킨다. 
<span class='line'> 94</span> 	 * @param {String} sMessage 컨트롤러에서 실행할 MSG_ prefix를 가진 메소드 이름 문자열
<span class='line'> 95</span> 	 * @param {Undefined|Array} aParam 컨트롤러에서 실행할 메소드에 넘겨지는 Arguments Array   
<span class='line'> 96</span> 	 */</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">	</span><span class="NAME">sendMessage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aParam</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">aParam</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">core</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._super</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">		</span><span class="KEYW">while</span><span class="PUNC">(</span><span class="NAME">core</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">core._super</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">			</span><span class="NAME">core</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">core._super</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">core</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">			</span><span class="NAME">core.notifyMessage</span><span class="PUNC">(</span><span class="NAME">sMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">			</span><span class="NAME">this.notifyMessage</span><span class="PUNC">(</span><span class="NAME">sMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>113</span> 	 * 하위 컨트롤러에게 정의된 메시지와 파라미터를 전파한다. 
<span class='line'>114</span> 	 * @param {String} sMessage 컨트롤러에서 실행할 MSG_ prefix를 가진 메소드 이름 문자열
<span class='line'>115</span> 	 * @param {Undefined|Array} aParam 컨트롤러에서 실행할 메소드에 넘겨지는 Arguments Array  
<span class='line'>116</span> 	 */</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT">	</span><span class="NAME">notifyMessage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT">		</span><span class="NAME">this._receiveMessage</span><span class="PUNC">(</span><span class="NAME">sMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this._oController</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">			</span><span class="NAME">this._oController</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">notifyMessage</span><span class="PUNC">(</span><span class="NAME">sMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>125</span> 	 * 메세지와 파라미터를 받아 해당 핸들러를 호출한다.
<span class='line'>126</span> 	 */</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">	</span><span class="NAME">_receiveMessage</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sMessageHandler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"MSG_"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">sMessage</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">[</span><span class="NAME">sMessageHandler</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"function"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">			</span><span class="KEYW">this</span><span class="PUNC">[</span><span class="NAME">sMessageHandler</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>135</span> 	 * $init() 이후 별도의 초기화 과정이 필요한 경우 사용한다. 
<span class='line'>136</span> 	 */</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">	</span><span class="NAME">_initalize</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oOptions</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">		</span><span class="COMM">//TODO IMPLEMENTS </span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">		</span><span class="COMM">//throw new "MUST BE IMPLEMENT _initalize()";</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>143</span> 	 * 생성된 컨트롤러의 초기화를 수행한다.
<span class='line'>144</span> 	 * (자신을 포함한 하위 컨트롤러의 _initalize() 메소드 호출)
<span class='line'>145</span> 	 * @param {Object} oOptions 옵션 객체   
<span class='line'>146</span> 	 * @return {Void} 반환값 없음 
<span class='line'>147</span> 	 */</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT">	</span><span class="NAME">startUp</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oOptions</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>149</span> </span><span class="WHIT">		</span><span class="NAME">this._initalize</span><span class="PUNC">(</span><span class="NAME">oOptions</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this._oController</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">			</span><span class="NAME">this._oController</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">_initalize</span><span class="PUNC">(</span><span class="NAME">oOptions</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>154</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span></pre></body></html>